/*
 * XML Type:  InvestmentBankTransaction
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.InvestmentBankTransaction
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML InvestmentBankTransaction(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class InvestmentBankTransactionImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.InvestmentBankTransaction
{
    
    public InvestmentBankTransactionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName STMTTRN$0 = 
        new javax.xml.namespace.QName("", "STMTTRN");
    private static final javax.xml.namespace.QName SUBACCTFUND$2 = 
        new javax.xml.namespace.QName("", "SUBACCTFUND");
    
    
    /**
     * Gets the "STMTTRN" element
     */
    public net.ofx.types.x2003.x04.StatementTransaction getSTMTTRN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StatementTransaction target = null;
            target = (net.ofx.types.x2003.x04.StatementTransaction)get_store().find_element_user(STMTTRN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "STMTTRN" element
     */
    public void setSTMTTRN(net.ofx.types.x2003.x04.StatementTransaction stmttrn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StatementTransaction target = null;
            target = (net.ofx.types.x2003.x04.StatementTransaction)get_store().find_element_user(STMTTRN$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.StatementTransaction)get_store().add_element_user(STMTTRN$0);
            }
            target.set(stmttrn);
        }
    }
    
    /**
     * Appends and returns a new empty "STMTTRN" element
     */
    public net.ofx.types.x2003.x04.StatementTransaction addNewSTMTTRN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StatementTransaction target = null;
            target = (net.ofx.types.x2003.x04.StatementTransaction)get_store().add_element_user(STMTTRN$0);
            return target;
        }
    }
    
    /**
     * Gets the "SUBACCTFUND" element
     */
    public net.ofx.types.x2003.x04.SubAccountEnum.Enum getSUBACCTFUND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBACCTFUND$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SubAccountEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SUBACCTFUND" element
     */
    public net.ofx.types.x2003.x04.SubAccountEnum xgetSUBACCTFUND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubAccountEnum target = null;
            target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().find_element_user(SUBACCTFUND$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SUBACCTFUND" element
     */
    public void setSUBACCTFUND(net.ofx.types.x2003.x04.SubAccountEnum.Enum subacctfund)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBACCTFUND$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SUBACCTFUND$2);
            }
            target.setEnumValue(subacctfund);
        }
    }
    
    /**
     * Sets (as xml) the "SUBACCTFUND" element
     */
    public void xsetSUBACCTFUND(net.ofx.types.x2003.x04.SubAccountEnum subacctfund)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubAccountEnum target = null;
            target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().find_element_user(SUBACCTFUND$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().add_element_user(SUBACCTFUND$2);
            }
            target.set(subacctfund);
        }
    }
}
